/*
 * p1981.cpp
 *
 *  Created on: 2013-3-18
 *      Author: zy
 */

#include<algorithm>
#include<cstdio>
#include<cmath>
#include<iostream>
using namespace std;
int sig(double d)
{
	return fabs(d) < 1E-6 ? 0 : d < 0 ? -1 : 1;
}
struct Point
{
	double x, y;
	double k;
	Point()
	{
	}
	Point(double x, double y) :
		x(x), y(y)
	{
	}
	void set(double x, double y)
	{
		this->x = x;
		this->y = y;
	}
	double mod()
	{//模
		return sqrt(x * x + y * y);
	}
	double mod_pow()
	{//模的平方
		return x * x + y * y;
	}
	void output()
	{
		printf("x = %f, y = %f\n", x, y);
	}
	bool operator <(const Point &p) const
	{
		return sig(x - p.x) != 0 ? x < p.x : sig(y - p.y) < 0;
	}
};

double cross(Point o, Point a, Point b)
{
	return (a.x - o.x) * (b.y - o.y) - (b.x - o.x) * (a.y - o.y);
}
double dot(Point &o, Point &a, Point &b)
{
	return (a.x - o.x) * (b.x - o.x) + (a.y - o.y) * (b.y - o.y);
}
double dot(Point &a, Point &b)
{
	return a.x * b.x + a.y * b.y; //(a.x-o.x)*(b.x-o.x) + (a.y-o.y)*(b.y-o.y);
}
int btw(Point &x, Point &a, Point &b)
{
	return sig(dot(x, a, b));
}

double dis(Point a, Point b)
{
	return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}
double cos(Point o, Point a, Point b)
{
	return dot(o, a, b) / dis(o, a) / dis(o, b);
}

/**
 maximum enclosing points
 单位圆的最多覆盖点
 */
struct MEP_Nod
{
	double A; //极角[0, 2*M_PI)
	int M; //模式：壹为进入，2为退出
	bool operator <(const MEP_Nod &nod) const
	{
		return sig(A - nod.A) ? A < nod.A : M > nod.M;
	}
	void set(double A, int M)
	{
		if (sig(A - 2 * M_PI) >= 0)
			A -= 2 * M_PI;
		else if (sig(A) < 0)
			A += 2 * M_PI;
		this->A = A;
		this->M = M;
	}
};
int MEP(Point*p, int n)
{
	static MEP_Nod N[2000];
	int s, tmp, tmpMax, ans, i, j;
	double theta, alpha, d, di;
	ans = 0;
	for (i = 0; i < n; i++)
	{
		s = 0;
		for (j = 0; j < n; j++)
		{
			if (i == j || sig((di = dis(p[i], p[j])) - 2) > 0)
				continue;
			theta = atan2(p[j].y - p[i].y, p[j].x - p[i].x);
			alpha = acos(di / 2.0);
			N[s++].set(theta - alpha, 1);
			N[s++].set(theta + alpha, -1);
			if (sig(N[s - 2].A - N[s - 1].A) > 0)
			{
				d = N[s - 1].A;
				N[s - 1].A = 2 * M_PI;
				N[s++].set(0, 1);
				N[s++].set(d, -1);
			}
		}
		sort(N, N + s);
		tmp = tmpMax = 0;
		for (j = 0; j < s; j++)
		{
			tmp += N[j].M;
			if (tmp > tmpMax)
				tmpMax = tmp;
		}
		if (tmpMax > ans)
			ans = tmpMax;
	}
	return ans + 1;
}
Point p[510];
int main()
{
	int n;
	while (scanf("%d", &n), n)
	{
		for (int i = 0; i < n; i++)
			scanf("%lf%lf", &p[i].x, &p[i].y);
		printf("%d\n", MEP(p, n));
	}
	return 0;
}
